package com.hnjfzn.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnjfzn.mall.domain.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserAddressMapper extends BaseMapper<UserAddress> {
    // MyBatis-Plus 自动生成常规的增删改查操作
    @Update("UPDATE UserAddress SET user_id = #{userId}, address_line1 = #{addressLine1}, address_line2 = #{addressLine2},city = #{city},state = #{state}, postal_code = #{postalCode}, phone_number = #{phoneNumber},is_default = #{isdefault},update_by = #{updateBy},update_time = #{updatetime},  remark = #{remark} WHERE category_id = #{categoryId}")
    int updateById(UserAddress userAddress);
}